/********************************************************************************
 * Copyright (c) 2008 - 2017 Profactor GmbH, TU Wien ACIN, fortiss GmbH
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *  Gerhard Ebenhofer, Alois Zoitl, Ingo Hegny, Monika Wenger
 *    - initial API and implementation and/or initial documentation
 ********************************************************************************/
package org.eclipse.fordiac.ide.model.libraryElement.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.fordiac.ide.model.libraryElement.Identification;
import org.eclipse.fordiac.ide.model.libraryElement.LibraryElementPackage;

/**
 * <!-- begin-user-doc --> An implementation of the model object
 * '<em><b>Identification</b></em>'. <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 * <li>{@link org.eclipse.fordiac.ide.model.libraryElement.impl.IdentificationImpl#getApplicationDomain
 * <em>Application Domain</em>}</li>
 * <li>{@link org.eclipse.fordiac.ide.model.libraryElement.impl.IdentificationImpl#getClassification
 * <em>Classification</em>}</li>
 * <li>{@link org.eclipse.fordiac.ide.model.libraryElement.impl.IdentificationImpl#getDescription
 * <em>Description</em>}</li>
 * <li>{@link org.eclipse.fordiac.ide.model.libraryElement.impl.IdentificationImpl#getFunction
 * <em>Function</em>}</li>
 * <li>{@link org.eclipse.fordiac.ide.model.libraryElement.impl.IdentificationImpl#getStandard
 * <em>Standard</em>}</li>
 * <li>{@link org.eclipse.fordiac.ide.model.libraryElement.impl.IdentificationImpl#getType
 * <em>Type</em>}</li>
 * </ul>
 *
 * @generated
 */
public class IdentificationImpl extends EObjectImpl implements Identification {
	/**
	 * The default value of the '{@link #getApplicationDomain() <em>Application
	 * Domain</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getApplicationDomain()
	 * @generated
	 * @ordered
	 */
	protected static final String APPLICATION_DOMAIN_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getApplicationDomain() <em>Application
	 * Domain</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getApplicationDomain()
	 * @generated
	 * @ordered
	 */
	protected String applicationDomain = APPLICATION_DOMAIN_EDEFAULT;

	/**
	 * The default value of the '{@link #getClassification()
	 * <em>Classification</em>}' attribute. <!-- begin-user-doc --> <!--
	 * end-user-doc -->
	 * 
	 * @see #getClassification()
	 * @generated
	 * @ordered
	 */
	protected static final String CLASSIFICATION_EDEFAULT = ""; //$NON-NLS-1$

	/**
	 * The cached value of the '{@link #getClassification()
	 * <em>Classification</em>}' attribute. <!-- begin-user-doc --> <!--
	 * end-user-doc -->
	 * 
	 * @see #getClassification()
	 * @generated
	 * @ordered
	 */
	protected String classification = CLASSIFICATION_EDEFAULT;

	/**
	 * The default value of the '{@link #getDescription() <em>Description</em>}'
	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getDescription()
	 * @generated
	 * @ordered
	 */
	protected static final String DESCRIPTION_EDEFAULT = ""; //$NON-NLS-1$

	/**
	 * The cached value of the '{@link #getDescription() <em>Description</em>}'
	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getDescription()
	 * @generated
	 * @ordered
	 */
	protected String description = DESCRIPTION_EDEFAULT;

	/**
	 * The default value of the '{@link #getFunction() <em>Function</em>}'
	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getFunction()
	 * @generated
	 * @ordered
	 */
	protected static final String FUNCTION_EDEFAULT = ""; //$NON-NLS-1$

	/**
	 * The cached value of the '{@link #getFunction() <em>Function</em>}' attribute.
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getFunction()
	 * @generated
	 * @ordered
	 */
	protected String function = FUNCTION_EDEFAULT;

	/**
	 * The default value of the '{@link #getStandard() <em>Standard</em>}'
	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getStandard()
	 * @generated
	 * @ordered
	 */
	protected static final String STANDARD_EDEFAULT = ""; //$NON-NLS-1$

	/**
	 * The cached value of the '{@link #getStandard() <em>Standard</em>}' attribute.
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @see #getStandard()
	 * @generated
	 * @ordered
	 */
	protected String standard = STANDARD_EDEFAULT;

	/**
	 * The default value of the '{@link #getType() <em>Type</em>}' attribute. <!--
	 * begin-user-doc --> <!-- end-user-doc -->
	 *
	 * @see #getType()
	 * @generated
	 * @ordered
	 */
	protected static final String TYPE_EDEFAULT = ""; //$NON-NLS-1$

	/**
	 * The cached value of the '{@link #getType() <em>Type</em>}' attribute. <!--
	 * begin-user-doc --> <!-- end-user-doc -->
	 *
	 * @see #getType()
	 * @generated
	 * @ordered
	 */
	protected String type = TYPE_EDEFAULT;

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	protected IdentificationImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return LibraryElementPackage.Literals.IDENTIFICATION;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String getApplicationDomain() {
		return applicationDomain;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void setApplicationDomain(String newApplicationDomain) {
		String oldApplicationDomain = applicationDomain;
		applicationDomain = newApplicationDomain;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET,
					LibraryElementPackage.IDENTIFICATION__APPLICATION_DOMAIN, oldApplicationDomain, applicationDomain));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String getClassification() {
		return classification;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void setClassification(String newClassification) {
		String oldClassification = classification;
		classification = newClassification;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LibraryElementPackage.IDENTIFICATION__CLASSIFICATION,
					oldClassification, classification));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String getDescription() {
		return description;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void setDescription(String newDescription) {
		String oldDescription = description;
		description = newDescription;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LibraryElementPackage.IDENTIFICATION__DESCRIPTION,
					oldDescription, description));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String getFunction() {
		return function;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void setFunction(String newFunction) {
		String oldFunction = function;
		function = newFunction;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LibraryElementPackage.IDENTIFICATION__FUNCTION,
					oldFunction, function));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String getStandard() {
		return standard;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void setStandard(String newStandard) {
		String oldStandard = standard;
		standard = newStandard;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LibraryElementPackage.IDENTIFICATION__STANDARD,
					oldStandard, standard));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String getType() {
		return type;
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void setType(String newType) {
		String oldType = type;
		type = newType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, LibraryElementPackage.IDENTIFICATION__TYPE, oldType,
					type));
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
		case LibraryElementPackage.IDENTIFICATION__APPLICATION_DOMAIN:
			return getApplicationDomain();
		case LibraryElementPackage.IDENTIFICATION__CLASSIFICATION:
			return getClassification();
		case LibraryElementPackage.IDENTIFICATION__DESCRIPTION:
			return getDescription();
		case LibraryElementPackage.IDENTIFICATION__FUNCTION:
			return getFunction();
		case LibraryElementPackage.IDENTIFICATION__STANDARD:
			return getStandard();
		case LibraryElementPackage.IDENTIFICATION__TYPE:
			return getType();
		default:
			return super.eGet(featureID, resolve, coreType);
		}
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
		case LibraryElementPackage.IDENTIFICATION__APPLICATION_DOMAIN:
			setApplicationDomain((String) newValue);
			return;
		case LibraryElementPackage.IDENTIFICATION__CLASSIFICATION:
			setClassification((String) newValue);
			return;
		case LibraryElementPackage.IDENTIFICATION__DESCRIPTION:
			setDescription((String) newValue);
			return;
		case LibraryElementPackage.IDENTIFICATION__FUNCTION:
			setFunction((String) newValue);
			return;
		case LibraryElementPackage.IDENTIFICATION__STANDARD:
			setStandard((String) newValue);
			return;
		case LibraryElementPackage.IDENTIFICATION__TYPE:
			setType((String) newValue);
			return;
		default:
			super.eSet(featureID, newValue);
			return;
		}
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
		case LibraryElementPackage.IDENTIFICATION__APPLICATION_DOMAIN:
			setApplicationDomain(APPLICATION_DOMAIN_EDEFAULT);
			return;
		case LibraryElementPackage.IDENTIFICATION__CLASSIFICATION:
			setClassification(CLASSIFICATION_EDEFAULT);
			return;
		case LibraryElementPackage.IDENTIFICATION__DESCRIPTION:
			setDescription(DESCRIPTION_EDEFAULT);
			return;
		case LibraryElementPackage.IDENTIFICATION__FUNCTION:
			setFunction(FUNCTION_EDEFAULT);
			return;
		case LibraryElementPackage.IDENTIFICATION__STANDARD:
			setStandard(STANDARD_EDEFAULT);
			return;
		case LibraryElementPackage.IDENTIFICATION__TYPE:
			setType(TYPE_EDEFAULT);
			return;
		default:
			super.eUnset(featureID);
			return;
		}
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
		case LibraryElementPackage.IDENTIFICATION__APPLICATION_DOMAIN:
			return APPLICATION_DOMAIN_EDEFAULT == null ? applicationDomain != null
					: !APPLICATION_DOMAIN_EDEFAULT.equals(applicationDomain);
		case LibraryElementPackage.IDENTIFICATION__CLASSIFICATION:
			return CLASSIFICATION_EDEFAULT == null ? classification != null
					: !CLASSIFICATION_EDEFAULT.equals(classification);
		case LibraryElementPackage.IDENTIFICATION__DESCRIPTION:
			return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
		case LibraryElementPackage.IDENTIFICATION__FUNCTION:
			return FUNCTION_EDEFAULT == null ? function != null : !FUNCTION_EDEFAULT.equals(function);
		case LibraryElementPackage.IDENTIFICATION__STANDARD:
			return STANDARD_EDEFAULT == null ? standard != null : !STANDARD_EDEFAULT.equals(standard);
		case LibraryElementPackage.IDENTIFICATION__TYPE:
			return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
		default:
			return super.eIsSet(featureID);
		}
	}

	/**
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy())
			return super.toString();

		StringBuilder result = new StringBuilder(super.toString());
		result.append(" (applicationDomain: "); //$NON-NLS-1$
		result.append(applicationDomain);
		result.append(", classification: "); //$NON-NLS-1$
		result.append(classification);
		result.append(", description: "); //$NON-NLS-1$
		result.append(description);
		result.append(", function: "); //$NON-NLS-1$
		result.append(function);
		result.append(", standard: "); //$NON-NLS-1$
		result.append(standard);
		result.append(", type: "); //$NON-NLS-1$
		result.append(type);
		result.append(')');
		return result.toString();
	}

} // IdentificationImpl
